package com.javatom.notest.alibaba;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description:
 * @author: 曾维录
 * @time: 2019/8/4 10:27
 */
@RestController
@RefreshScope
public class EchoController {

    @Value("${echoname}")
    private String username;

    @GetMapping(value = "/echo/{string}")
    public String echo(@PathVariable String string) {
        return username +"Hello Nacos Discovery " + string;
    }
}
